package state.improve.states;

import state.improve.AbstractState;
import state.improve.ElevatorManager;

public class StopState extends AbstractState {
    private ElevatorManager elevatorManager;

    public StopState(ElevatorManager elevatorManager) {
        this.elevatorManager = elevatorManager;
    }

    @Override
    public void open() {
        System.out.println("打开电梯");
        elevatorManager.setState(elevatorManager.getOpenState());
    }

    @Override
    public void run() {
        System.out.println("运行电梯");
        elevatorManager.setState(elevatorManager.getRunState());
    }
}
